//
//  XATextView.h
//  bestv
//
//  Created by Yangshuang on 2020/9/4.
//  Copyright © 2020 XunAo. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol XATextViewDelegate <NSObject>

@optional

/**
 textView 键盘return事件监听
 */
-(BOOL)XATextViewShouldReturn:(UITextView *_Nonnull)textView;


/**
 textView内容改变实时监听
 */
- (void)XATextViewDidChange:(UITextView *_Nonnull)textView;


/**
 textView end editing
 */
- (void)XATextViewDidEndEditing:(UITextView *_Nonnull)textView;

@end



NS_ASSUME_NONNULL_BEGIN

@interface XATextView : UITextView

@property (nonatomic,weak) id <XATextViewDelegate> realDelegate;

/**
 TextView允许输入的最大长度 默认 0不限制
 */
@property (nonatomic,assign) NSInteger maxLength;

/**
 输入内容长度
 */
@property (nonatomic,assign) NSInteger inputLength;

@end

NS_ASSUME_NONNULL_END
